package com.cow.sram.data.dao;

import java.io.Serializable;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.cow.sram.data.entity.Orginfo;

public interface OrginfoDAO extends JpaRepository<Orginfo, Serializable>{
	/**
	 *	获取组织编码 
	 */
	@Query(value="select ifnull(max(orgcode),'0') from orginfo t where t.superorgid=:superorgid",nativeQuery=true)
	public String getMaxOrgCode(@Param("superorgid")Integer superorgid);

}
